home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / amos / amoslist-0195.lzh / AMOSLIST / text0020.txt < prev    next >
Encoding:
Text File  |  1995-02-01  |  1.2 KB  |  31 lines

  1. >3. Are there any useful tips for ensuring that your program
  2. >   runs at a similar speed on different speed Amigas, particularly
  3. >   when you're using AMAL?
  4.  
  5.  AC>   Use the vertical blank interrupt.  In your main program, put "Wait
  6.  AC> Vbl"
  7.  AC> at the end of your main loop, and use a "P" command at the end of a
  8.  AC> loop
  9.  AC> in AMAL..  If your loops are long, there may be a speed decrease on
  10.  AC> slow
  11.  AC> Amigas, but otherwise, your program will be sync'ed to the vertical
  12.  AC> blank, which (apart from differences between NTSC and PAL, which you
  13.  AC> can
  14.  AC> detect with the Ntsc function) is always the same speed.
  15. Wrong. Sorry Andy, but:
  16. This assumes that you main loop will be compleated within one screen
  17. refresh.
  18. If your main loop takes longer than 1 vbl cycle on an 68000 and less than 1
  19. on a 68+ then there will be a speed increase on the faster machine.
  20. Included in the Amospro sample programs is Dithell's Wonderland. It uses a
  21. loop at the begining of the program. If the loop takes less than a certain
  22. time, it assumes that the machine is an A3000 (fair assumption) and has an
  23. additional wait Vbl in it's main loop to slow it down just that little bit
  24. more.
  25. Check it out. 
  26. Darryl
  27.  
  28. -- Via DLG Pro v1.0
  29.  
  30.  
  31.